package cn.fr4nk.crawler.thread;

public class Manager {

	private ThreadPool crawlerHandler;
	private ThreadPool proxyValidator;
	private ThreadPool resultHandler;
	private ThreadPool taskProducer;
	
	
	public void addCrawlerHandler(Runnable r) {
		crawlerHandler.addRunnable(r);
	}

	public void addResultHandler(Runnable r) {
		resultHandler.addRunnable(r);
	}

	public void addTaskProducer(Runnable r) {
		taskProducer.addRunnable(r);
	}

	public void addProxyValidator(Runnable r) {
		proxyValidator.addRunnable(r);
	}
	
	public ThreadPool getCrawlerHandler() {
		return crawlerHandler;
	}
	
	public ThreadPool getProxyValidator() {
		return proxyValidator;
	}

	public ThreadPool getResultHandler() {
		return resultHandler;
	}

	public ThreadPool getTaskProducer() {
		return taskProducer;
	}

	public void setCrawlerHandler(ThreadPool crawlerHandler) {
		this.crawlerHandler = crawlerHandler;
	}

	public void setProxyValidator(ThreadPool proxyValidator) {
		this.proxyValidator = proxyValidator;
	}

	public void setResultHandler(ThreadPool resultHandler) {
		this.resultHandler = resultHandler;
	}

	public void setTaskProducer(ThreadPool taskProducer) {
		this.taskProducer = taskProducer;
	}

}
